/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package veluanasoft.modelo;

/**
 *
 * @author Ali Kate
 */

public class Wood {
    private String typeOfWood;
    private double price;
    private double deliveryTime;

    public Wood(String typeOfWood) {
        this.typeOfWood = typeOfWood;
        calcDeliveryTimeAndPrice();
    }

    public String getTypeOfWood() {
        return typeOfWood;
    }

    public double getPrice() {
        return price;
    }

    public double getDeliveryTime() {
        return deliveryTime;
    }

    private void calcDeliveryTimeAndPrice(){
        if (this.typeOfWood.equals("Cherry")){
            this.typeOfWood += "\t";
            this.deliveryTime = 0.5;
            this.price = 5.95;
        }else if(this.typeOfWood.equals("Curly Maple")){
            this.typeOfWood += "\t";
            this.deliveryTime = 1.5;
            this.price = 6.0;
        }else if(this.typeOfWood.equals("Genuine Mahugany")){
            this.deliveryTime = 3.0;
            this.price = 9.60;
        }else if(this.typeOfWood.equals("Wenge")){
            this.typeOfWood += "\t";
            this.deliveryTime = 5.0;
            this.price = 22.35;
        }else if(this.typeOfWood.equals("White Oak")){
            this.typeOfWood += "\t";
            this.deliveryTime = 1.5;
            this.price = 6.7;
        }
    }
}
